'''
This file is part of ModeliMark.

ModeliMark is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.

ModeliMark is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with ModeliMark.
If not, see <http://www.gnu.org/licenses/>.

Copyright 2012 Jens Frenkel
'''

from modelimark.modelgenerator import BaseModelGenerator
import os

class MSL(BaseModelGenerator):
    '''
    classdocs
    '''


    def __init__(self,Libraries=[]):
        '''
        Constructor
        '''

        if (not isinstance(Libraries,list)):
            Libraries=[Libraries]

        self.libraries = Libraries

    def modelIdentifier(self, modelname):
        assert(isinstance(modelname,str))
        return modelname

    def generateModelSource(self, modelname, dir):

        assert(isinstance(modelname,str))
        assert(isinstance(dir,str))

        # new directory
        if not os.access(dir, os.F_OK):
            os.mkdir(dir)

        return modelname, [], dir, self.libraries

